package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.demo.common.Client1Config;
import com.example.demo.common.Config;

@SpringBootApplication
@EnableConfigurationProperties({ Config.class, Client1Config.class })
@EnableEurekaClient
@RestController
public class EurekaConfigApplication {

	public static void main(String[] args) {
		SpringApplication.run(EurekaConfigApplication.class, args);
	}

	@RequestMapping("/test")
	public String test(String name) {
		return Client1Config.getName() + "hello:" + Config.getName();
	}
}
